package com.pfzy.utildemo.activity.db;

import android.os.Bundle;

import com.pfzy.utildemo.activity.base.BaseActivity;
import com.pfzy.utildemo.databinding.ActivityDbBinding;

import java.util.List;

public class DBActivity extends BaseActivity {
    private ActivityDbBinding mBind;

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        mBind = ActivityDbBinding.inflate(getLayoutInflater());
        setContentView(mBind.getRoot());
        initView();
        initData();
    }

    private void initView() {
    }

    private void initData() {
        DBManager.getInstance().init(this);
        for (int i = 0; i < 9; i++) {
            Passenger user = new Passenger();
            user.setUserId("1");
            DBManager.getInstance().insert(user);
        }

        List<Passenger> qItem = DBManager.getInstance().queryAll();
    }
}
